<!-- *Author: 黄旗, *Date: 2020-08-04 15:45:59 -->
<template>
    <Modal v-model='modal' title='编辑' :mask-closable='false' @on-cancel='canceledit(modalname)'>
        <Form :label-width='80' :ref='modalname' :model='modalparams' :rules='createRules'>
            <FormItem label='名称' prop='name'>
                <Input clearable v-model='modalparams.name' placeholder='请输入名称' />
            </FormItem>
        </Form>
        <div slot='footer'>
            <Button @click='canceledit(modalname)'>取消</Button>
            <Button type='primary' :loading="subloading" @click='submitedit(modalname)'>保存</Button>
        </div>
    </Modal>
</template>

<script>
    export default {
        name: '',
        components: {},

        data () {
            return {
                modalname: 'modalname',
                modal: false,
                subloading: false,
                modalparams: { page: 1, pageSize: 10 },
                createRules: {
                    name: [{
                        required: true,
                        message: '请输入名称',
                        trigger: 'change'
                    }]
                }
            };
        },
        /* 函数方法集合 */
        methods: {
            /* @函数功能: 初始化 */
            initial () {
                this.modal = true
            },
            askData () {
            }, // 请求数据处理
            canceledit () { },
            submitedit () { }
        }
    }
</script>
